package com.itsense.stock.mapper;

import com.itsense.stock.pojo.domain.StockDescribeDomain;
import com.itsense.stock.pojo.domain.StockSearchResultDomain;
import com.itsense.stock.pojo.entity.StockBusiness;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author sense
* @description 针对表【stock_business(主营业务表)】的数据库操作Mapper
* @createDate 2024-12-30 20:59:30
* @Entity com.itsense.stock.pojo.entity.StockBusiness
*/
public interface StockBusinessMapper {

    int deleteByPrimaryKey(String id);

    int insert(StockBusiness record);

    int insertSelective(StockBusiness record);

    StockBusiness selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(StockBusiness record);

    int updateByPrimaryKey(StockBusiness record);

    List<String> getAllStockCodes();

    /**
     * 返回模糊搜索的股票结果数据
     * @param searchStr
     * @return
     */
    List<StockSearchResultDomain> getStockSearchResult(@Param("searchStr") String searchStr);

    /**
     * 通过股票编码返回对应的主营业务信息
     * @param code
     * @return
     */
    StockDescribeDomain getDescribeByCode(@Param("stockCode") String code);
}
